﻿var deleteSuiteGridSelected = function (sender) {
    var grid = sender.up("grid");
    if (grid.hasSelection()) {
        Ext.Msg.confirm('提示', "是否删除选中的栏目？", function (answer) {
            if (answer == "yes") {
                grid.deleteSelected();
            }
        });
    }
};

var beforeEditSuite = function (editor, row) {
    if (row.record.internalId == 0) {
        return false;
    }
};

var changeSuite = function (grid, record) {
    var suiteId = record.internalId;
    App.GridPanel1.store.proxy.extraParams.suiteId = suiteId;
    App.GridPanel1.store.reload();
};

var renderAdvType = function (value) {
    var result = "";
    if (value.toLowerCase() == "image") {
        result = "图片";
    }
    else {
        result = "Flash";
    }
    return result;
};